package blogs.eidos.cloud.framework.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;

/**
 * @author ： Eidos
 * @date ：Created in 2021/2/26
 * @description：
 * @modified By：
 * @version: 1.0
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "UpdateStateDto", description = "状态更新对象")
public class UpdateStateDto {

    @NotNull(message = "ID不能为空")
    @Digits(integer = 20,fraction = 1,message = "ID长度为1-20")
    @ApiModelProperty(value = "ID", required = true)
    private Long id;

    @NotNull(message = "状态不能为空")
    @Digits(integer = 1, fraction = 1, message = "状态长度为1")
    @ApiModelProperty(value = "状态：1-启用；0-禁用", required = true)
    private Integer state;
}
